package com.itany.shop.dao;

import com.itany.shop.entity.User;
import com.itany.shop.exception.DataAccessException;

/**
 * Author:shixiaojun@itany.com
 * Date:2022/4/14 13:33
 * Version:1.0-SNAPSHOT
 * Description:
 */
public interface UserDao {

    /**
     * 根据用户名查询用户信息
     * @param username
     * @return
     */
    public User selectByUsername(String username) throws DataAccessException;

    /**
     * 添加用户信息
     * @param user
     */
    public void insertUser(User user) throws DataAccessException;

    /**
     * 根据用户名与密码查询用户信息
     * @param username
     * @param password
     * @return
     */
    public User selectByUsernameAndPassword(String username,String password) throws DataAccessException;
}
